package edu.umd.ion.wavemeter.server;

import edu.umd.ion.wavemeter.service.PIDSettings;
import edu.umd.ion.wavemeter.service.PIDSettingsInUse;
import edu.umd.ion.wavemeter.service.WavemeterException;

public interface PIDControl {
	public static class ChannelVoltage {
		int Channel;
		double Voltage;
	}
	
	public String setCourse( int Channel, String Course ) throws WavemeterException;
	public void unlockPID(int channel) throws WavemeterException;
	public PIDSettings setPID( PIDSettings PID ) throws WavemeterException;
	public PIDSettings getPID(int Channel);
	public PIDSettingsInUse getPIDSettingsInUse();
	public void registerCourseOracle(PIDCourseOracle o);
	
	public void enableRegulation(int channel, boolean enable, RunnableTwo<ChannelVoltage, Double> callback );
	public void clear(int channel) throws WavemeterException;
	
	public void cleanup();
	// internal stuff
	public void measuredValue(int channel, long time, double result);
}
